package script.quizview.item
{
	import model.quiz.MathQuestionVo;
	
	import ui.quiz.QuestionItemUI;
	
	public class QuestionResultCell extends QuestionItemUI
	{
		public function QuestionResultCell()
		{
			super();
		}
		
		public function setData(data:MathQuestionVo):void
		{
			var questitle:String = data.numlist[0] + "";
			for(var i:int=0;i < data.operateList.length;i++)
			{
				questitle += ["+","-"][data.operateList[i] - 1] + data.numlist[i+1];
			}
			
			this.questiondes.text = questitle;
			
			this.answertxt.text = data.answer.toString();
			
			this.myanswertxt.text = data.myanswer.toString();
			
			if(data.answer == data.myanswer)
				this.resultimg.skin = "icon/right.png";
			else
				this.resultimg.skin = "icon/sign-error-icon.png";

		}
	}
}